package com.chenhao.springcloud.chenhaodesignservice.pattern.structural.decorator.v2;

/**
 * Description:
 *
 * @author chenhao
 * @date 2020/12/23 11:28
 */
public class Test {
    public static void main(String[] args) {
        ABattercake aBattercake;
        aBattercake = new Battercake();
        aBattercake = new EggDecorator(aBattercake);
        aBattercake = new EggDecorator(aBattercake);
        aBattercake = new SausageDecorator(aBattercake);
        System.out.println(aBattercake.getDesc()+"销售价格"+aBattercake.cost());
    }
}
